﻿@using MultipleDbContextEfCoreDemo.Web.Models
@using MultipleDbContextEfCoreDemo.Web.Startup
@{
    ViewBag.ActiveMenu = PageNames.Home;
}
@model MultipleDbContextEfCoreDemo.Web.Models.HomeViewModel
@section scripts
    {
    <environment names="Development">
        <script src="~/js/views/home/index.js"></script>
    </environment>
    <environment names="Staging,Production">
        <script src="~/js/views/home/index.min.js"></script>
    </environment>
}
<h2>@L("HelloWorld")!</h2>
<div class="row">
    <div class="col-lg-12">
        @L("Home_Description")
    </div>
</div>
<div class="row">
    <div class="col-md-6">
        <h2>List of People and Courses</h2>
        <ul>
            @foreach (var data in Model.Data)
            {
                <li>
                    @data
                </li>
            }
        </ul>
    </div>
    <div class="col-md-6">
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading"><h4>Create New Person</h4></div>
                    <div class="panel-body">
                        <form>
                            <div class="form-group">
                                <label>Name</label>
                                <input class="form-control" type="text" name="person-name"/>
                            </div>
                            <button type="button" id="btnSavePerson" class="btn btn-primary">Submit</button>
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading"><h4>Create New Course</h4></div>
                    <div class="panel-body">
                        <form>
                            <div class="form-group">
                                <label>Name</label>
                                <input class="form-control" type="text" name="course-name"/>
                            </div>
                            <button type="button" id="btnSaveCourse" class="btn btn-primary">Submit</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
